/**
 *    @file       maintaincmd.cpp
 *
 *    @brief      
 *    @details
 *
 *    @version    1.0
 *    @date       02/17/2014 02:21:13 PM
 *
 *    @author     Theophilus (), wangtf418@gmail.com
 */
#include "maintaincmd.h"
#include "logwrite.h"

bf_int_t logswitchcmd::process_cmd()
{
	m_res_cmdhead.m_version = m_req_cmdhead.m_version;
	m_res_cmdhead.m_sequence = m_req_cmdhead.m_sequence;
	bf_bool_t logflag = (m_req_cmdbody.m_logflag == 0)? false:true;
	bf_int_t ret = logwrite::set_openflag(m_req_cmdbody.m_logtype, logflag);
	if (ret != BF_OK)
	{
		m_res_cmdbody.m_result = -1;
	}
	else
	{
		m_res_cmdbody.m_result = 0;
	}
	return BF_OK;
}

